A network processor may be used as a single-chip switch/router or on an ingress or egress line card in a modular switch/router. Many prior art network processors comprise several intermediate buffers that are used between different modules of the network processor, causing the network processor to have more buffer space than needed. Further, the several intermediate buffers may cause latency during processing.
FIG. 1 schematically shows a prior art network processor 1 having several intermediate buffers. As illustrated, the network processor 1 comprises a traffic manager 2, interfaces 3, buffers 4a, 4b, 4c, with queues and schedulers, processing means 5, and optional external memories 6a, 6b, cf. FIG. 1. Packet data received from the interfaces 3 are buffered in an input buffer 4a, processed by the processing means 5, buffered in an intermediate buffer 4b before being written to the buffers of the traffic manager 2. From the traffic manager 2, the packet data is scheduled and transmitted on the interfaces 3 via an output buffer 4c. Due to varying requirements between different systems, the ideal sequence of packet processing varies. For example, all or part of the traffic leaving the traffic manager may require an additional pass through the processing means before transmission as illustrated by a loopback path 7. In other cases, two passes through the traffic manager may be required.
A drawback with the prior art network processor 1 is the large required buffer size, which is larger than needed. If for example, a burst of packet data passes through the network processor 1 of FIG. 1, it is first stored in the input buffer 4a, later in the intermediate buffer 4b and last in the output buffer 4c. This means that each of the buffers; input buffer, the intermediate buffer and the output buffer, must provide buffer space for a normal amount of packet data and for the burst size.
Another drawback with the prior art network processor is the sequential flow of packets through the network processor. As illustrated in FIG. 1, firstly, the packets are received on the interface; secondly, they are buffered in the input buffer; thirdly, they are processed by the processing means; fourthly, they are buffered in the intermediate buffer; fifthly, they are written to the buffers of the traffic manager; and sixthly, they are buffered in an output buffer; and seventhly, they are transmitted on the interfaces.
US 2005/0169259 to Su et al discloses a packet switching unit comprising ports, a packet switching control unit, a microprocessor data transfer interface, a microprocessor, and a packet buffer. The packet buffer comprises a packet area, an index buffer and a transfer queue circuitry. Both the packet switching control unit and the microprocessor data transfer interface can transfer packet from/to the ports and the microprocessor, respectively.
A drawback with the packet switching unit to Su et al is that it also requires large buffer space, since the ports have a store-and-forward functionality implying that the packets are stored by the ports before they are moved into the packet buffer.
US 2007/0230475 to Langner discloses a switch-based network processor comprising input interfaces, output interfaces, processing elements, and a switch with bidirectional ports. The network processor associates information with a packet received via an input interface, and this information is sequentially processed through multiple ones of the processing elements in serial order based on switching operations of the switch. The network processor may be viewed as providing selectable interconnection between inputs and outputs of the various processing elements dependent on the application. For a certain application, packets will therefore flow only to the particular processing elements that are needed and in the appropriate order. The sequence of processing elements is obtained by configuration of the switch and of the processing elements.
A drawback with the network processor to Langner is the predetermined serial order of packet switching for a given application such as a secure transaction server application, a secure sockets layer (SSL) VPN firewall application or a secure Internet protocol (IPSEC) VPN firewall application. After configuration for a specific application, all packets will have the same serial processing order and thus will take the same path through the network processor.